<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
*{
    margin:0;
    padding:0;
}
.page{
    /* 顺时针 */
    padding:0 15px;
}
.header,.nav,.main,.footer{
    background-color: green;
    height:100px;
    text-align: center;
    color:white;
    /* margin-bottom:10px; */
    line-height:100px;
    border-radius: 10px;;
}
/* 选中footer */
/*.footer{
    margin-bottom:0;
}*/
/*:not(.footer){
    margin-bottom:0;
}*/
.page>div:last-child{
    margin-bottom:0;
}
.main{
    /*两列式布局*/
    /*启动弹性布局
    新的格式上下文，取代了原来的块级上下文
    页面排版=块级行内上下文（流体布局）+布局格式上下文（flex,响应式布局，浮动布局float，定位布局position*/
    display:flex;

}
.aside{
    width:300px;
    background-color: red;
}
/* 右侧固定，左侧弹性分配空间的两列式布局方案 */
.article{
  flex:1; 
  background-color: pink;
}
    </style>
</head>
<body>
    <!-- 传统写法 div+css 
    div  代表盒子吗？-->
    <div class="page">
   <div class="header">header</div>
       <div class="nav">nav</div>
           <div class="main">
               <div class="article">article</div>
               <div class="aside">aside</div>
   </div> 
   <div class="footer">footer</div>
   </div>
</body>
</html>